home *** CD-ROM | disk | FTP | other *** search
-
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
-
- /* simple string comparison, I made it because the amigashell IF EQ
- is not case sensitive, and it can be annoying sometimes */
-
- /* Returns 5 if strings are not equal, 0 otherwise */
-
- int main (int argc, char **argv);
-
- int main(argc, argv)
- /* [<][>][^][v][top][bottom][index][help] */
- int argc;
- char *argv[];
- {
- int ret=0;
-
- /* Check for the correct number of arguments. */
- if (argc < 2) {
- fprintf(stderr, "Usage: strcmp <string1> <string2>\n");
- exit(1);
- }
-
- if (strcmp(argv[1],argv[2]))
- {
- ret=5; /* WARN */
- }
-
- return ret;
- }
-